import request from '@/utils/request'

const mudulePath = 'sys/menu/'
export function saveMenu(data) {
  return request({
    url: mudulePath + 'save',
    method: 'post',
    data
  })
}

export function updateMenu(data) {
  return request({
    url: mudulePath + 'update',
    method: 'post',
    data
  })
}

export function getUserMenuList() {
  return request({
    url: mudulePath + 'getUserMenuList',
    method: 'get'
  })
}

export function getMenuList() {
  return request({
    url: mudulePath + 'list',
    method: 'get'
  })
}

export function onlyGetMenuList() {
  return request({
    url: mudulePath + 'listMenu',
    method: 'get'
  })
}

export function getMenuInfo(menuId) {
  return request({
    url: mudulePath + 'info/' + menuId,
    method: 'get'
  })
}

export function deleteMenu(menuIds) {
  return request({
    url: mudulePath + 'delete',
    method: 'post',
    data: menuIds
  })
}
